SetTrackDimensions
TheSetTrackDimensions
function allows your application to establish a track's source, or display, rectangle.
pascal void SetTrackDimensions (Track theTrack, Fixed width, Fixed height);
theTrack
- Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack
andGetMovieTrack
(described on page 2-136 and page 2-188, respectively).width
- Contains a fixed-point number that specifies the width, in pixels, of the track's rectangle. This value corresponds to the x coordinate of the lower-right corner of the track's rectangle.
height
- Contains a fixed-point number that specifies the height, in pixels, of the track's rectangle. This value corresponds to the y coordinate of the lower-right corner of the track's rectangle.
DESCRIPTION
A track's source rectangle defines the coordinate system of the track. You specify the dimensions of the rectangle by providing the coordinates of the lower-right corner of the rectangle. The Movie Toolbox sets the upper-left corner to (0,0) in the track's coordinate system.If you change the dimensions of an existing track, the media data is scaled to fit into the new rectangle.
ERROR CODES
invalidTrack -2009 This track is corrupted or invalid SEE ALSO
You can use theGetTrackDimensions
function, which is described in the next section, to retrieve a track's rectangle.